package adv6;

public class Zhoubabi {

	public static void main(String[] args) {
		Thread.currentThread().setName("周扒皮");

		Thread3Worker t1 = new Thread3Worker("小高");
		Thread3Worker t2 = new Thread3Worker("杨白劳");
		t1.start();
		t2.start();
		while (true) {
			try {
				System.out.println("地主" + Thread.currentThread().getName() + "睡觉1500毫秒");
				Thread.sleep(1400);
				System.out.println("地主" + Thread.currentThread().getName() + "睡醒了，喊工人干活");
				t1.interrupt();
				t2.interrupt();
			} catch (InterruptedException e) {
				// TODO 自动生成的 catch 块
				e.printStackTrace();
			}
		}
	}

}
